package com.stars.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.stars.RestPage;
import com.stars.pojo.OrgPerdom;
import com.stars.service.OrgPerdomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.Map;

/**
 * @program: stars
 * @ClassName OrgPerdomController
 * @description:
 * @author: aodi
 * @create: 2024-11-13 14:08
 * @Version 1.0
 *
 *  人事管理部分
 */
@RestController
@RequestMapping("/orgperdom")
public class OrgPerdomController {

    @Autowired
    private OrgPerdomService orgPerdomService;


    @RequestMapping("/queyList")
    public Page<OrgPerdom> selectPerdom(@RequestBody Map<String,Object> map){
        Page<OrgPerdom> orgPerdomPage = orgPerdomService.selectPerdom(map);
        return  orgPerdomPage ;
    }

    //修改信息

    @RequestMapping("/updatePerdmo")
    public void  updatePerdom(@RequestParam(value = "file" ,required = false)MultipartFile file,
                              @RequestParam(value = "jsonData" ,required = false) String jsonData) throws Exception{

        this.orgPerdomService.updatePerdom(file , jsonData);
    }



}
